package edu.jd.block_chain.security.login.impl;

import edu.jd.block_chain.security.login.LoginDto;
import edu.jd.block_chain.security.login.LoginService;
import edu.jd.block_chain.security.login.dao.LoginDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @descriptions:
 * @data: 2021/11/23 21:09
 */
@Service
@Transactional
public class LoginServiceImpl implements LoginService {

    @Resource
    private LoginDao loginDao;

    @Override
    public boolean checkLogin(LoginDto dto) {
        int cnt = loginDao.findCountByUserNameAndPwd(dto);
        return cnt>0;
    }
}
